﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace TMV.Models.Input
{
    public class Permission
    {
        #region Properties

        [Key]
        public int Id { get; set; }

        [Required]
        [StringLength(100)]
        public string Code { get; set; }

        [Required]
        [StringLength(100)]
        public string Name { get; set; }

        public string Description { get; set; }

        #endregion

        #region Relationship
        public virtual ICollection<ApplicationRole> Roles { get; set; }
        #endregion

        public Permission()
        {
            Roles = new HashSet<ApplicationRole>();
        }
    }
}